package tf

import (
	app "gitee.com/go_888/xcgui/xcgui/app"
	window "gitee.com/go_888/xcgui/xcgui/window"
	xcc "gitee.com/go_888/xcgui/xcgui/xcc"
	"runtime"
)

// TFunc 测试用程序. 测试时使用的函数.
//
// f: 回调函数.
func TFunc(f func(a *app.X结构_全局API, w *window.Window)) {
	runtime.LockOSThread()
	defer runtime.UnlockOSThread()
	a := app.X创建(true)
	a.X启用DPI(true)
	a.X启用自动DPI(true)
	w := window.X创建窗口(0, 0, 600, 400, "Test", 0, xcc.X窗口样式_默认样式)
	f(a, w)
	w.X显示(true)
	a.X运行()
	a.X退出()
}
